<template>
  <div>
    <a-descriptions title="联盟授权" :column="2">
      <a-descriptions-item label="淘宝联盟授权昵称">
        {{ userInfoData.userBindTbAccount || '暂无' }}
      </a-descriptions-item>
      <a-descriptions-item label="淘宝联盟账号">
        <span class="mr-20">{{ userInfoData.grantTbAccount || '暂无' }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="淘宝渠道授权RID">
        {{ userInfoData.isBindTb || '暂无' }}
      </a-descriptions-item>
      <a-descriptions-item label="京东授权状态" :span="2">
        {{ userInfoData.isBindJd || '暂无' }}
      </a-descriptions-item>
      <a-descriptions-item label="拼多多联盟授权">
        <span class="mr-20">{{ userInfoData.isBindPdd }}</span>
        <span class="mr-20" v-if="userInfoData.userBindPddAccount">{{
          userInfoData.userBindPddAccount || '暂无'
        }}</span>
      </a-descriptions-item>
    </a-descriptions>
    <a-descriptions style="margin-top: 20px" title="用户信息" :column="{ xxl: 2, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
      <a-descriptions-item label="注册手机">
        <span>{{ mobile }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="当前等级">
        {{ userInfoData.userRankName || '用户' }}
      </a-descriptions-item>
      <a-descriptions-item label="微信号">{{ userInfoData.wx || '暂无' }}</a-descriptions-item>
      <a-descriptions-item label="邀请人">{{ userInfoData.inviteId || '暂无' }}</a-descriptions-item>
      <a-descriptions-item label="零元购资格">
        <span>{{ userInfoData.haveCanUseNum ? '正常可领取' : '资格已使用' }}</span>
      </a-descriptions-item>
      <!-- <a-descriptions-item label="所属地区">{{ userInfoData.city || '暂无' }}</a-descriptions-item> -->
      <a-descriptions-item label="是否注销">
        <span>{{ userInfoData.isDeleted == 1 ? '已删除' : userInfoData.isDisable == 1 ? '已注销' : '未注销' }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="注销时间" v-if="userInfoData.isDisable == 1">
        {{ userInfoData.logoutLogAt ? userInfoData.logoutLogAt : '--' }}
      </a-descriptions-item>
      <a-descriptions-item label="注销原因" v-if="userInfoData.isDisable == 1">
        {{ userInfoData.logoutLogRemark ? userInfoData.logoutLogRemark : '--' }}
      </a-descriptions-item>
    </a-descriptions>
  </div>
</template>
<script setup>
import { Message, Modal } from '@arco-design/web-vue'
const props = defineProps(['userInfo', 'mobile'])
const emit = defineEmits(['getUserDetail'])
const WithdrawalModalRef = ref()
const mobile = ref()
const userInfoData = ref({})
watch(
  () => props,
  (e) => {
    userInfoData.value = props?.userInfo || {}
    mobile.value = userInfoData.value.mobile
  },
  {
    immediate: true,
    deep: true
  }
)
</script>
